const crypto = require('crypto');
// 定义钥匙
const SECRET_KEY = 'Wjz123.#'

// 定义规则 md5
const md5 = (password) => {
  return crypto.createHash('md5').update(password).digest('hex');
}

// 定义加密函数
const getPassword = (password) => {
  return md5(`password=${password}&key=${SECRET_KEY}`)
}

module.exports = {
  getPassword
}